<?php

abstract class Common_DataTable_Persistence_Abstract 
    extends    ClassStructure_Mixin_Delegator
    implements Common_DataTable_Persistence {

    private $obj_datatable = null;
    
    public function __construct(Common_DataTable $obj_datatable = null, $arr_options = array()) {
        
        parent::__construct();
        
        $this->setDataTable($obj_datatable);
        
        $this->__addMixin('property');
        
        $this->property__setProperties($arr_options);
        
    }
    
    public function setDataTable(Common_DataTable $obj_datatable) {
        $this->obj_datatable = $obj_datatable;
    }
    
    public function getDataTable() {
        return $this->obj_datatable;
    }
    
    protected function generatePersistenceKey() {
        return 'persistence-data---' . md5(serialize($this->getDataTable()));
    }
}

